"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const taro_1 = require("@tarojs/taro");
const redux_1 = require("@tarojs/redux");
const components_1 = require("@tarojs/components");
const YTableDivider_1 = require("../../components/YTableDivider");
require("./Questions.scss");
const questions_1 = require("../../actions/questions");
let default_1 = class extends taro_1.Component {
    constructor() {
        super(...arguments);
        this.config = {
            navigationBarTitleText: '常见问题'
        };
        this.onGetPhoneNumber = msg => {
            console.log(msg);
        };
    }
    componentWillReceiveProps(nextProps) {
        console.log(this.props, nextProps);
    }
    componentWillMount() {
        this.props.fetch();
    }
    componentWillUnmount() { }
    componentDidShow() { }
    componentDidHide() { }
    render() {
        return (<components_1.View className='article_1543485218582'>
        {this.props.questions.data.data.map((item, k) => (<components_1.View className='cell' key={k}>
              <YTableDivider_1.default title={item.title}/>
              <components_1.View className='content'>
                <components_1.Text className='text'>
                  {item.brief}
                </components_1.Text>
              </components_1.View>          
            </components_1.View>))}
      </components_1.View>);
    }
};
default_1 = __decorate([
    redux_1.connect(({ questions }) => ({
        questions
    }), (dispatch) => ({
        fetch() {
            dispatch(questions_1.fetch());
        }
    }))
], default_1);
exports.default = default_1;
//# sourceMappingURL=Questions.jsx.map